package com.example.xunua_today_in_history.utils;

import java.io.IOException;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public class OkHttpUtil {
    public String connect_get(String url) throws IOException {
        OkHttpClient client=new OkHttpClient();
        Request request=new Request.Builder()
                .url(url).build();
        Response response=client.newCall(request).execute();
        String responseData=response.body().string();
        return responseData;
    }
}
